<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 1.定义对象
        let person=new Object()
        person.name='庄雅淑'
        person.age='18'
        person.eyecolor='black'
        console.log(person)
        let p={
            'name':'zys',
            'age':'18',
            'eyecolor':'black',
            get:function(){
                console.log(this.name)
            }
        }
        //2.循环遍历对象
        for(x in p){
            console.log(p[x])
        }
        p.get()


    
    </script>
</body>
</html>